package com.shrcl.engineerprocess.domain.events;

import com.shrcl.engineerprocess.domain.EngineerCertification;
import com.shrcl.engineerprocess.domain.events.EngineerCertificationEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrcl.engineerprocess.domain.events.EngineerCertificationEventsManager")
public class EngineerCertificationEventsManager extends EntityEventsManager<EngineerCertification> {
  @Autowired(required = false)
  private Collection<EngineerCertificationEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<EngineerCertificationEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireCheckTimer(final EngineerCertification entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).checkTimer(entity);
    }
    
  }
  
  public void fireCheckExpiredTimer(final EngineerCertification entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).checkExpiredTimer(entity);
    }
    
  }
  
  public void fireUpdate(final EngineerCertification entity, final Procedure1<? super EngineerCertification> updater) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).update(entity,updater);
    }
    
  }
  
  public void fireCommit(final EngineerCertification entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).commit(entity);
    }
    
  }
  
  public void fireForceClosed(final EngineerCertification entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).forceClosed(entity);
    }
    
  }
  
  public void fireRenew(final EngineerCertification entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCertificationEventsListener)listener).renew(entity);
    }
    
  }
}
